package cn.com.xy.sms.sdk.ui.popu.widget;

import java.lang.reflect.Method;

import android.content.res.AssetManager;
import android.graphics.Typeface;
import cn.com.xy.sms.sdk.ui.popu.util.SmartSmsSdkUtil;

public final class SmartisanosTypeface {
    public static Typeface CLOCK = null;
    public static Typeface CLOCK_BOLD = null;
    public static Typeface CLOCK_LIGHT = null;

    static{
        try{
            Class<?> clazz = Class.forName("android.content.res.AssetManager");
            Object obj = clazz.newInstance();
            Method method = obj.getClass().getDeclaredMethod("addAssetPath", String.class);
            method.invoke(obj, "/system/framework/framework-smartisanos-res.apk");
            AssetManager am = (AssetManager) obj;
            
            CLOCK = Typeface.createFromAsset(am, "SmartisanClock.ttf");
            CLOCK_BOLD = Typeface.createFromAsset(am, "SmartisanClock-Bold.ttf");
            CLOCK_LIGHT = Typeface.createFromAsset(am, "SmartisanClock-Light.otf");
        }catch(Throwable ex){
            SmartSmsSdkUtil.smartSdkExceptionLog("SmartisanosTypeface", ex);
        }
    }

    // can't instantiate
    private SmartisanosTypeface() {

    }

}
